package pl.mcnova.view.panels;

import java.util.ArrayList;
import java.util.List;

import javax.swing.JPanel;
import javax.swing.JTextField;

import com.jgoodies.forms.layout.CellConstraints;
import com.jgoodies.forms.layout.FormLayout;

public class FilterPanel extends JPanel {

	private List<JTextField> texts;
	private CellConstraints cc;

	public FilterPanel() {
		FormLayout leyout = new FormLayout(
				"pref:grow,pref:grow, pref:grow, pref:grow, pref:grow, pref:grow, pref:grow, pref:grow, pref:grow, pref:grow, pref:grow, pref:grow",
				"5px,fill:pref,5px, fill:pref,5px");
		setLayout(leyout);

		cc = new CellConstraints();

		texts = new ArrayList<JTextField>();

		for (int i = 0; i < 12; i++) {
			JTextField tf = new JTextField();
			texts.add(tf);
			add(tf, cc.xy(i + 1, 2 + 2 * (i % 2)));
			i++;
		}
	}

}
